<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="学期设置"></title>
</head>
<style>
    .layui-col-md6 {
        padding: 10px;
    }
</style>
<body>
<div class="">
    <div class="layui-fluid ">
        <div class="layui-row layui-col-space15">
        </div>
        <!--头工具栏和行工具栏 数据表格-->
        <div class="layui-col-md12">
            <div class="layui-col-md6">
                <div class="layui-card">
                    <!--<div class="layui-card-header">外籍学生列表</div>-->
                    <table class="layui-hide" id="term-table" lay-filter="term-table"></table>
                </div>
            </div>

            <div class="layui-col-md6">
                <div class="layui-card">
                    <!--<div class="layui-card-header">外籍学生列表</div>-->
                    <table class="layui-hide" id="term-table2" lay-filter="term-table"></table>
                </div>
            </div>

            <div class="layui-col-md6">
                <div class="layui-card">
                    <!--<div class="layui-card-header">外籍学生列表</div>-->
                    <table class="layui-hide" id="term-table3" lay-filter="term-table"></table>
                </div>
            </div>

            <div class="layui-col-md6">
                <div class="layui-card">
                    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
                    <div id="main" style="width: 600px;height:400px;"></div>
                </div>
            </div>


        </div>
    </div>
    <!-- 全局js -->
    <script>
        layui.use(['form', 'table', 'layer', 'laydate', 'laytpl', 'echarts'], function () {
            var $ = layui.$
                , element = layui.element
                , table = layui.table
                , layer = layui.layer
                , echarts = layui.echarts
                , form = layui.form;

            var myChart = echarts.init(document.getElementById('main'));
            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: 'ECharts 入门示例'
                },
                tooltip: {},
                legend: {
                    data: ['销量']
                },
                xAxis: {
                    data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
                },
                yAxis: {},
                series: [{
                    name: '销量',
                    type: 'bar',
                    data: [5, 20, 36, 10, 10, 20]
                }]
            };
            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);


            var colst = [
                {field: 'id', hide: true}
                , {field: 'title', title: '标题'}
                , {field: 'content', title: '内容'}
                , {field: 'addDate', title: '创建时间'}
            ]
            //表格渲染
            table.render({
                elem: '#term-table'
                , url: '/notice/page'
                , cellMinWidth: 80
                , toolbar: '#toolbar'
                , cols: [colst]
                , id: "term-table"
                , page: {
                    limit: 5
                }
            })
            //表格渲染
            table.render({
                elem: '#term-table2'
                , url: '/notice/page'
                , cellMinWidth: 80
                , cols: [colst]
                , id: "term-table"
            })
            table.render({
                elem: '#term-table3'
                , url: '/notice/page'
                , cellMinWidth: 80
                , cols: [colst]
                , id: "term-table"
            })
            form.render();
        });
    </script>
</div>
</body>
</html>
